<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>实现网</title>
<link href="<?php echo base_url()?>css/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url()?>css/zy.css" rel="stylesheet" type="text/css" />


<script>
function setTab(name,cursel,n)
{
	for(i=1;i<=n;i++)
	{
		var menu=document.getElementById(name+i);
		var con=document.getElementById("con_"+name+"_"+i);
		menu.className=i==cursel?"hover":"";
		con.style.display=i==cursel?"block":"none";
	}
}
</script>
</head>

<body>
<?php $this->load->view('header_view') ?>
<?php $this->load->view('guider_view') ?>

<!--内容开始-->
          <div id="center">
               <div id="box">
                   <div class="bodydiv">
                    <div class="fqxm">
                  <img src="<?php echo base_url()?>images/zytp/fqwdxm.jpg" width="254" height="53" style="float:left; margin-left:15px; margin-top:10px;">
             </div>
             <div class="fqxmnr">
             <div class="Menubox">
                  <ul>
                    <li id="one1" onclick="setTab('one',1,6)"  ><a href="<?php echo base_url()?>index.php/Publish/brief" >项目简介</a></li>
<!--                    <li id="one2" onclick="setTab('one',2,6)" class="hidden" ><a href="fbxm/NewsList.aspx?nid=132">详情描述</a></li>-->
<!--                    <li id="one3" onclick="setTab('one',3,6)" class="hidden"><a href="fbxm/NewsList.aspx?nid=133">回报设置</a></li>-->
<!--                    <li id="one4" onclick="setTab('one',4,6)" class="hidden"><a href="fbxm/NewsList.aspx?nid=134">问答设置</a></li>-->
<!--                    <li id="one5" onclick="setTab('one',5,6)" class="hidden"><a href="fbxm/NewsList.aspx?nid=135">项目状态</a></li>-->
<!--                    <li id="one6" onclick="setTab('one',6,6)" class="hidden"><a href="fbxm/NewsList.aspx?nid=135">提交审核</a></li>-->
                  </ul>
                 <a href="#"><img src="<?php echo base_url()?>images/zytp/yl.jpg" width="111" height="36" style="float:right; margin-right:15px;"></a>
                 <a href="#"><img src="<?php echo base_url()?>images/zytp/sxxmz.jpg" width="111" height="36" style="float:right; margin-right:15px;"></a>
                </div>
                <div id="con_one_1">
                <form id="c1submit" action="<?php echo site_url('publish/detail')?>" method="post" enctype="multipart/form-data">
                  <div class="fqxmnr"> 
                      <div class="zb">
                         <div class="zbkj">
                              <span class="zbkjz">选择类别：</span>
                              <a href="#" rel="1" class="zbkjzk">设计</a>
                              <a href="#" rel="2" class="zbkjzk">科技</a>
                              <a href="#" rel="3" class="zbkjzk">影视</a>
                              <a href="#" rel="4" class="zbkjzk">摄影</a>
                              <a href="#" rel="5" class="zbkjzk">音乐</a>
                              <a href="#" rel="6" class="zbkjzk">出版</a>
                              <a href="#" rel="7" class="zbkjzk">活动</a>
                              <a href="#" rel="8" class="zbkjzk">游戏</a>
                              <a href="#" rel="9" class="zbkjzk" style="margin-top:5px;">旅行</a>
                              <a href="#" rel="10" class="zbkjzk" style="margin-top:5px;">其他</a>
                              <input type="hidden" name="pro_type" id="pro_type" >
                         </div>  
                         <div class="zbkj">
                             <span class="zbkjz" style="margin-top:1px;">项目名称：</span>
                             <input id="pro_name" name="pro_name" type="text"  value=" 不超过25个字"  class="fqwbk"
                                   onBlur="if(!value){value=defaultValue;this.style.color='#999'}"
                                   onFocus="if(value==defaultValue){value='';this.style.color='#000'}"     
                                   style="color:#999999; line-height:25px;"/>
                         </div> 
                         <div class="zbkj">
                              <span class="zbkjz" style="margin-top:1px;">发起地点：</span>
                              <select name="province_id" id="province_id" class="fqwbk1">
								<?php foreach($provinces as $key => $province): ?>
									<option value="<?php echo $province['region_id']; ?>"
										 <?php 
											 if($province['region_id']==$province_selected)
											 {
												 echo 'selected';
											 }
										 ?> 
									>
										 <?php echo $province['region_name']; ?>
									</option>
								<?php endforeach;?>
                              </select>
                              <select name="city_id" id="city_id" class="fqwbk1">
								<?php foreach($citys as $key => $city): ?>
									<option value="<?php echo $city['region_id']; ?>"
										<?php 
											if($city['region_id']==$city_selected)
											{
												echo 'selected';
											}
										?> 
									>
										<?php echo $city['region_name']; ?>
									</option>
								<?php endforeach;?>
                              </select>
                         </div>
                          <div class="zbkj">
                               <span class="zbkjz" style="margin-top:1px;">简要说明：</span>
                               <input id="pro_desc" name="pro_desc" type="text"  value=" 不超过75个字"  class="fqwbk2"
                                   onBlur="if(!value){value=defaultValue;this.style.color='#999'}"
                                   onFocus="if(value==defaultValue){value='';this.style.color='#000'}"     
                                   style="color:#999999; line-height:25px;"/>
                          </div>
                           <div class="zbkj">
                               <span class="zbkjz" style="margin-top:1px;">缩略图：</span>
							   <span style="margin-left:20px;"><span id="spanButtonPlaceholder" style="height:25px;"></span></span>
							   <span id="divFileProgressContainer" style="margin-top:3px; margin-left:3px; height:10px;"></span>
								<br>
								<span style="margin-top:10px; margin-left:-80px;">支持jpg 、png 、gif 格式。不超过2MB!</span>
								<input type="hidden" id="existThumb" name="existThumb"/>
                          </div>
                          <div class="zbkj">
                               <span class="zbkjz" style="margin-top:1px;">集募金额：</span>
                               <input name="pro_money" type="text"  value=" 不少于500元"  class="fqwbk1"
                                   onBlur="if(!value){value=defaultValue;this.style.color='#999'}"
                                   onFocus="if(value==defaultValue){value='';this.style.color='#000'}"     
                                   style="color:#999999; line-height:25px;"/>
                               <span class="zbkjz" style="margin-top:1px; margin-left:10px;">元</span>
                          </div>
                           <div class="zbkj">
                               <span class="zbkjz" style="margin-top:1px;">上线天数：</span>
                               <input id="pro_day" name="pro_day" type="text"  value=" 15-30天"  class="fqwbk1"
                                   onBlur="if(!value){value=defaultValue;this.style.color='#999'}"
                                   onFocus="if(value==defaultValue){value='';this.style.color='#000'}"     
                                   style="color:#999999; line-height:25px;"/>
                               <span class="zbkjz" style="margin-top:1px; margin-left:10px;">元</span>  
                          </div>
                          <div class="zbkj">
                               <a id="one1submit" href="javascript:c1submit();">
								   <img src="<?php echo base_url()?>images/zytp/xyb.jpg" 
								   width="120" 
								   height="39" 
								   style="float:left; 
								   margin-left:250px; 
								   margin-top:10px;">
							   </a>
                          </div>
                          </form>
                      </div>
                      <div class="yb">
                            <div class="ybkj">
                                 <a href="#" class="ybkjz">编辑预览</a>
                                 <a href="#" class="ybkjzz"> | 范例</a>
                            </div>
                            <div class="nrbf" style="margin-top:5px;">
                               <!--<img id="thumb_img" width="217" height="155" style="float:left; margin-left:6px; margin-top:5px;" />-->
                               <!-- <div id="thumbnails" style="float:left; 
							               margin-left:6px; 
										   margin-top:5px;
										   width:357;
										   height:400; 
										   background-color:#CC33FF">缩略图
							    </div>-->
								<div id="thumbnails">
							    </div>
								
							   <div class="nrbfz">
							 
                                <div class="nrbfzz">
                                    <a href="#" class="nrbfzz" id="thumb_pro_name">项目名称</a>
                                </div>
								
								
                                <div class="nrbfzz">
                                    <span>洛泉</span> 
                                    <span style="margin-left:45px;">发起于</span>
                                     <span style="margin-left:45px;">广东深圳</span> 
                                </div>
								<div class="nrbfzz">
                                    <a href="#" class="nrbfzz" id="thumb_pro_desc"></a>
                                </div>
								
                                <img src="<?php echo base_url()?>images/2.jpg" width="215" height="17" style="float:left;  margin-top:10px;">
                                 <div class="nrbfzz" style="clear:both; font-size:14px; font-weight:bold; margin-top:10px;">
                                    <a href="#">0%</a> 
                                    <a href="#" style="margin-left:35px;" id="thumb_pro_money">￥0</a> 
                                    <a href="#" style="margin-left:35px;" id="thumb_pro_day">0</a>天
                                </div>
                                <div class="nrbfzz">
                                     <span>达到</span> 
                                    <span style="margin-left:45px;">已获支持</span>
                                     <span style="margin-left:40px;">剩余时间</span> 
                                </div>
                             </div>
                        </div> 
                      </div>
                   </div>
                </div>
               </div>
                  </div>
                  <div class=detail-top id=ark:detailTop><A href="#">返回顶部</A></DIV>
                  <SCRIPT src='<?php echo base_url()?>js/fun.js'></SCRIPT>
                </div>  
               </div>
<!--内容结束-->


<?php $this->load->view('footer_view') ?>
</body>
</html>

<script type="text/javascript" src="<?php echo base_url()?>swfupload/swfupload.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>swfupload/handlers.js"></script>


<script  language="JavaScript">
	var swfu;
	window.onload = function () {
		swfu = new SWFUpload({
		
		
		
		
			// Backend Settings
			upload_url: "<?php echo site_url('publish/do_upload')?>",    //上传文件的全URL
			post_params: {
				"PHPSESSID": "<?php echo session_id(); ?>",
				"user_id": "<?php echo $this->session->userdata('user_id'); ?>",
				"user_nickname": "<?php echo $this->session->userdata('user_nickname'); ?>",
				"user_in": "<?php echo $this->session->userdata('user_in'); ?>"
			},
			
			// File Upload Settings
			file_size_limit : "2 MB",                               //允许上传的文件大小
			file_types : "*.jpg;*.gif;*.png",
			file_types_description : "All Images",
			file_upload_limit : "0",
			file_post_name : "Filedata",
			use_query_string: false,

			// Event Handler Settings - these functions as defined in Handlers.js
			//  The handlers are not part of SWFUpload but are part of my website and control how
			//  my website reacts to the SWFUpload events.
			
			/*
			file_dialog_start_handler:function()
			{
				$("#divFileProgressContainer").html("")
			},
			*/
			
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			/*
			file_dialog_complete_handler:function(a,b)
			{
				this.startUpload()
			},
			*/
			upload_progress_handler : uploadProgress,
			
			
			/*
			upload_progress_handler:function(a,b,c)
			{
				alert("");
				$("#divFileProgressContainer").html($("<em>文件上传中 "+Math.ceil(b/c*99)+"%</em>"))
			},
			*/
			
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			/*
			upload_success_handler:function(a,b)
			{
				$("#thumbnails").html($(b)),
				$($("#thumbnails").children()).fadeIn(1500),
				$("#divFileProgressContainer").html("")
			},
			*/
			
			upload_complete_handler : uploadComplete,
			
			/*
			upload_complete_handler:function(a)
			{
				this.startUpload()
			},
			*/
			
			// Button Settings
			button_image_url : "<?php echo base_url()?>swfupload/button.gif",
			button_placeholder_id : "spanButtonPlaceholder",
			button_width: 80,
			button_height: 32,
			button_text_top_padding: 0,
			button_text_left_padding: 0,
			button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
			button_cursor: SWFUpload.CURSOR.HAND,
			button_action : SWFUpload.BUTTON_ACTION.SELECT_FILE,
			
			// Flash Settings
			flash_url : "<?php echo base_url()?>swfupload/swfupload.swf",


			custom_settings : {
				upload_target : "divFileProgressContainer"
			},
	
			// Debug Settings
			debug: false
		});
	} 





function c1submit() {
	$('#c1submit').submit();
};





<?php if(isset($province_selected)):?>
var province_selected = <?php echo (int)$province_selected?>;
<?php else:?>
var province_selected = 0;
<?php endif?>

<?php if(isset($city_selected)):?>
var city_selected = <?php echo (int)$city_selected?>;
<?php else:?>
var city_selected = 0;
<?php endif?>

<?php if(isset($district_selected)):?>
var district_selected = <?php echo (int)$district_selected?>;
<?php else:?>
var district_selected = 0;
<?php endif?>


$(document).ready(function() {
	var change_city = function(){
		$.ajax({
		  url: '<?php echo site_url('regionChange/selectChildren/parent_id')?>'+'/'+$('#province_id').val(),
		  type: 'GET',
		  dataType: 'html',
		  success: function(data){
			city_json = eval('('+data+')');
			var city = document.getElementById('city_id');
			city.options.length = 0;
			for(var i=0; i<city_json.length; i++){
				var len = city.length;
				city.options[len] = new Option(city_json[i].region_name, city_json[i].region_id); 
				if (city.options[len].value == city_selected){
					city.options[len].selected = true;
				}
			}
			change_district();//重置地区
		  }
		});
	}
	
	change_city();//初始化城市
	
	$('#province_id').change(function(){
	 change_city();
	});


	var change_district = function(){
	$.ajax({
	  url: '<?php echo site_url('regionChange/selectChildren/parent_id')?>'+'/'+$('#city_id').val(),
	  type: 'GET',
	  dataType: 'html',
	  success: function(data){
		district_json = eval('('+data+')');
		var district = document.getElementById('district_id');
		district.options.length = 0;
		for(var i=0; i<district_json.length; i++){
			var len = district.length;
			district.options[len] = new Option(district_json[i].region_name, district_json[i].region_id); 
			if (district.options[len].value == district_selected){
				district.options[len].selected = true;
			}
		}
	  }
	});
	}

 	change_district();//改变地区

	$('#city_id').change(function(){
	 change_district();
	});

	$('.zbkjzk').click(function(){
	  $('.zbk2').removeClass().addClass('zbkjzk');;
	  $(this).addClass('zbk2');
	  $('#pro_type').val($(this).attr('rel'));
	  //alert($('#pro_type').val());
	});
	
	
	$('#pro_name, #pro_desc, #pro_day').keyup(function(){
		$("#thumb_" + this.id).html($(this).val())
	});
	
	
	
	
	
	/*
	$('#img_file').change(
		function(){
			$("#thumb_img" ).attr('src','<?php echo base_url()?>/upload/24.jpg');
		},
		function(){
			$("#thumb_img").fadeIn();
		}
	);
	*/
});
</script>

